<template>
  <div>盒子</div>
  <div class="father">
    <!-- 🔔 Vue3 新特性：teleport传送，可以组件传送到其他位置 -->
    <Teleport to="body">
      <div class="box">盒子</div>
    </Teleport>
  </div>
</template>

<script>

</script>

<style lang="less" scoped>
.father {
  background-color: aquamarine;
  height: 500px;
  width: 500px;
  margin: 0 auto;
  transform: translateX(0);
}
.box {
  width: 300px;
  height: 300px;
  background-color: pink;
  position: fixed;
  left: 50px;
  top: 50px;
}
</style>
